package com.deer.wms.base.system.dao.bill;

import com.deer.wms.base.system.model.bill.*;
import com.deer.wms.base.system.model.box.BoxItemDto;
import com.deer.wms.common.core.commonMapper.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BillOutSapMapper {

    /*SAP入库单明细列表*/
    List<BillOutSapDetailDto> findBillOutSapDetailList(BillOutSapDetailDto billOutSapDetailDto);
    /*SAP入库单列表*/
    List<BillOutSap> findBillOutSapList(BillOutSap billOutSap);
    /*根据id找sap单*/
    BillOutSapDto findBillOutSapByBillOutSapId(Integer billOutSapId);
    /*根据id找sap单明细*/
    List<BillOutSapDetailDto> findBillOutSapDetailByBillOutSapId(Integer billOutSapId);
    /*更改入库状态*/
    void updateBillOutSap(BillOutSap billOutSap);
    /*新建出库单*/
    void insertBillOutMaster(BillOutMaster billOutMaster);
    /*新增SAP*/
    void insertBillOutSap(BillOutSapDto billOutSapDto);
    /*新增SAP明细*/
    void insertBillOutSapDetail(BillOutSapDto sapDetail);
    /*强制过账*/
    void postingSap(int billOutSapId);
    void postingSapDetail(int billOutSapId);
    void postingMaster(int billOutSapId);

    /*修改明细状态为已过帐*/
    void updateDetailCarryStateById(Integer id);
    /*未审核明细数量*/
    int selectCarryStateCount(Integer id);
    /*部分过账*/
    void updateBillInSapState3(Integer id);
    /*已过帐*/
    void updateBillInSapState2(Integer id);
    /*查询出库过账vo*/
    BillOutSapDetailDto findBillOutSapDetailVo(Integer id);

    List<Integer> findStateDetailById(int billOutSapId);
    /*出库计划部分过账*/
    void updateBillInMasterState3(int id);
    /*出库计划已过账*/
    void updateBillInMasterState2(int id);
    /*删出库计划单*/
    int deleteSapByIds(Integer id);
    /*删出库计划明细*/
    int deleteSapDetailByIds(Integer id);
    /*特殊出库计划明细*/
    void insertDetailByBoxItem(BoxItemDto boxItem);

}
